package com.cmii.sjw.department.control.jsc.controller;

import com.cmii.sjw.department.control.jsc.service.DistrictEducationService;
import com.cmii.sjw.department.control.jsc.util.Result;
import org.springframework.web.bind.annotation.*;

import jakarta.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 区县质量体系驾驶舱二级页面数据
 *
 * @author lizheng
 * @date 2025-06-06
 */
@RestController
@CrossOrigin
@RequestMapping("/second")
public class DistrictEducationController {

    @Resource
    private DistrictEducationService districtEducationService;


    /**
     * 区县指标详情
     *
     * @return 列表
     */
    @PostMapping("/metrics")
    public Result<Map<String, List<Map<String, String>>>> getMetricsByDistrict(@RequestParam String districtName) {
        Map<String, List<Map<String, String>>> result = districtEducationService.getMetricsByDistrict(districtName);
        return Result.success(result);
    }
}
